package com.oo.viewlib

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import com.oo.viewlib.fragments.PieChartFragment
import com.oo.viewlib.fragments.RadarChartFragment

class BlankActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_blank)

        val page = intent.getIntExtra("page", 1);
        when (page) {
            1 -> {
                Log.i("BlankActivity", ": RadarChart")
                supportFragmentManager.beginTransaction().replace(R.id.contain, RadarChartFragment()).commit()
            }
            2 -> {
                Log.i("BlankActivity", ": PieChart")
                supportFragmentManager.beginTransaction().replace(R.id.contain, PieChartFragment()).commit()
            }
        }

    }
}
